package com.example.springboot.mapper;


import com.example.springboot.entity.students;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Insert;
import java.util.List;
@Mapper
public interface SignupFormMapper {

    @Select("SELECT * FROM students")
    List<students> findAll();
    @Insert("INSERT INTO students(student_id, name, phone) VALUES(#{student_id}, #{name}, #{phone})")
    void save(students students);
    @Select("SELECT COUNT(*) > 0 FROM students WHERE student_id = #{student_id}")
    boolean existsById(int student_id);
}